<?php

echo "                <table width=\"140px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "                    <tr>\n";
echo "                      <td><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;</font></td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td valign=\"bottom\" bgcolor=\"#FFFFFF\">\n";
echo "                        <div align=\"left\"></div>\n";
echo "                        <table width=\"80%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "                          <tr>\n";
echo "                            <td width=\"5\" bgcolor=\"#FFFFFF\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;</font></td>\n";
echo "                            <td width=\"100\" height=\"18\" bgcolor=\"#006699\"> <div align=\"center\"><font color=\"#FFFFFF\" size=\"2\" face=\"Arial, Helvetica, sans-serif\"><strong>Menu</strong></font></div></td>\n";
echo "                            <td width=\"20\" height=\"18\" background=\"img/bt3.gif\" bgcolor=\"#FFFFFF\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;</font></td>\n";
echo "                          </tr>\n";
echo "                        </table>\n";
echo "                        <div align=\"left\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\"><strong></strong></font></div></td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td bgcolor=\"#E9E9E9\">&nbsp;</td>\n";
echo "                    </tr>\n";
# Carga de modulos
include("inc/psa_conect.php");
$sql = "select * from modulos where acceso <= '".$_REQUEST["novell_acceso"]."' order by posicion";

$result = mysql_query($sql,$link);
if ($row = mysql_fetch_array($result)){
   do {
    echo "                    <tr>\n";
    if ($row["titulo"] == "-spc-"){
       echo "                      <td bgcolor=\"#E9E9E9\" class=\"submenu\"><font color=\"#006699\">&nbsp;</font></td>\n";
       echo "                    </tr>\n";
       echo "                    <tr>\n";
       echo "                      <td bgcolor=\"#E9E9E9\" ><font color=\"#006699\">&nbsp;</font></td>\n";

    } else {
       if ($row["tipo"] == "I"){
          echo "                      <td bgcolor=\"#E9E9E9\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;<strong>&middot;&nbsp;</strong><font color=\"#006699\"><a href=\"index.php?psa_modulo=".$row["lk"]."\">".ltrim(rtrim($row["titulo"]))."</a></font></font></td>\n";
       } else {
          echo "                      <td bgcolor=\"#E9E9E9\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;<strong>&middot;&nbsp;</strong><font color=\"#006699\"><a href=\"".$row["lk"]."\">".ltrim(rtrim($row["titulo"]))."</a></font></font></td>\n";
       }
    }
    echo "                    </tr>\n";
   } while ($row = mysql_fetch_array($result));
}
# Carga Modulos de Super Admin.
if ($_REQUEST["novell_acceso"] == "1000"){
    echo "                    <tr>\n";
    echo "                      <td bgcolor=\"#E9E9E9\" class=\"submenu\">&nbsp;</td>\n";
    echo "                    </tr>\n";
    echo "                    <tr>\n";
    echo "                      <td bgcolor=\"#E9E9E9\" ><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;</font></td>\n";
    echo "                    </tr>\n";
    echo "                    <tr>\n";
    echo "                      <td bgcolor=\"#E9E9E9\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;<strong>&middot;&nbsp;</strong><font color=\"#006699\"><b><a href=\"index.php?psa_modulo=mod/admusuarios/prueba.php\">Usuarios</a></b></font></font></td>\n";
    echo "                    </tr>\n";
    echo "                    <tr>\n";
    echo "                      <td bgcolor=\"#E9E9E9\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;<strong>&middot;&nbsp;</strong><font color=\"#006699\"><b><a href=\"index.php?psa_modulo=mod/modulos/prueba.php\">Modulos</a></b></font></font></td>\n";
    echo "                    </tr>\n";
}
# ----------------
echo "                    <tr>\n";
echo "                      <td bgcolor=\"#E9E9E9\" class=\"submenu\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;</font></td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td valign=\"bottom\" bgcolor=\"#E9E9E9\">&nbsp;</td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td bgcolor=\"#E9E9E9\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;<strong>&middot;&nbsp;</strong><font size=3 color=\"#006699\"><b><a href=\"mod/usuarios/check.php\">SALIR</a></b></font></font></td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td valign=\"bottom\" bgcolor=\"#E9E9E9\" class=\"submenu\">&nbsp;</td>\n";
echo "                    </tr>\n";
echo "                    <tr>\n";
echo "                      <td><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">&nbsp;</font></td>\n";
echo "                    </tr>\n";
echo "                  </table>\n";
//echo $_REQUEST["novell_acceso"];

//phpinfo();

?>
